Skip to main content

2.19.4. Response

FieldDescriptionType
statussuccess | error
codeError codeInteger
messageError text (optional)String
printErrorPrint error code (when using the cash register in case of a problem with receipt printing)Integer
documentIDID of the document in the smartone Cashbox system (when using a cash register)Integer
fiscalIDFiscal document code (use for return)String
fiscalNumDocument numberString
docTimeDocument creation date and time, format: yyyy-MM-dd hh:mm:ssString
printTimeDocument closing date and time, format: yyyy-MM-dd hh:mm:ssString
docStatus0 - invoice not closed, 1 - invoice closedInteger
rrnTransaction number of payment via bank terminalString
authAuthorization codeString
cardNumCard numberString
checkNumCheck numberString
totalPayments [{...}]Array of document paymentsArray

totalPayments {...} Array​

FieldDescriptionType
codePayment type codeString
amountPayment amount in kopecksInteger

Error codes​

FieldDescription
0No error
1Authorization error
2Invalid JSON format
3Required parameters not passed
4The amount on the document does not correspond to the amount on the positions
5Internal error
6Shift not open
7Payment type is not supported
8The document is not fully paid (with automatic fiscalization)
9Document not found
11Change can only be issued in cash
12Unacceptable tax percentage
13Loan repayment can only be accepted by one type of payment at a time
16Incorrect tax percentage

Responce example:​

{
    "auth": "796660",
    "card_num": "537541******5609",
    "checkNum": "",
    "documentID": 15,
    "extraParams": {},
    "fiscalID": "25",
    "fiscalNum": "25",
    "docTime": "",
    "printTime": "",
    "docStatus": "",
    "message": "",
    "rrn": "410910000017",
    "shiftOrdersCnt": 0,
    "status": "success"
}

Response structure:​

{
"status": "success",
"code": "integer, error code",
//0 – no error,
//1 – authorization error,
//2 – incorrect JSON format,
//3 – mandatory parameters are missing,
//4 – document total does not match item totals,
//5 – internal error,
//6 – cash register is not open,
//7 – unsupported payment type,
//8 – document is not fully paid (during automatic fiscalization),
//9 – document not found,
//11 – change can only be given for cash payment,
//12 – invalid tax percentage,
//13 – loan repayment can only be accepted with one payment type at a time,
//16 – incorrect tax percentage
"message": "string, error text, optional",
"printError": 0,
"documentID": 0,
"fiscalID": "string, fiscal document code (use for returns)",
"fiscalNum": "string, document number",
"docTime": "string, document creation date and time, format: yyyy-MM-dd hh:mm:ss",
"printTime": "string, document closing date and time, format: yyyy-MM-dd hh:mm:ss",
"docStatus": 0,
"rrn": "string, transaction number for payment via bank terminal",
"auth": "string, authorization code",
"cardNum": "string, card number",
"checkNum": "string, check number",
"totalPayments": [
{
"code": "string, payment type code",
"amount": "integer, payment amount in kopecks"
}
]
}